@can('fan',$user)
<div class="text-center mb-3">
    @if(\Illuminate\Support\Facades\Auth::user()->isFaning($user->id))
        <form action="{{route('unfan.user',$user->id)}}" method="POST">
            {{method_field('DELETE')}}
            @csrf
            <button type="submit" class="btn btn-sm btn-outline-primary">取消关注</button>
        </form>
    @else
        <form action="{{route('fan.user',$user->id)}}" method="POST">
            @csrf
            <button type="submit" class="btn btn-sm btn-outline-primary">关注</button>
        </form>
    @endif
</div>
@endcan
